<template>
  <div>
    <div class="indexUser">
      <div>
        <!-- header  点击 -->
        <headers :userList="userList"></headers>
      </div>
      <div class="bg1 userBox">
        <div class="wrap bgw chufang">
          <div class="list">
            <div class="title">我的处方</div>
            <div class="box">
              <img class="fl" src="@/assets/image/bg1.jpg" alt />
              <div class="fl txt">
                <p>
                  <span class="c1">王富贵</span> 药师
                </p>
                <p>时间：10200</p>
                <p class="c1">查看详情</p>
              </div>
              <div class="fr">
                <p class="redc">已拒绝</p>
                <!-- <p class="hui">同意</p> -->
              </div>
            </div>
          </div>
        </div>
      </div>
      <div>
        <publicBottom></publicBottom>
      </div>
    </div>
  </div>
</template>
<script>
import headers from "./header"; // 头部 TOP 和header
import publicBottom from "@/components/public/public_bottom"; //底部
import { usergetinfo } from "@/request/user";

export default {
  components: {
    headers,
    publicBottom
  },
  data() {
    return {
      userList: [] // 个人信息
    };
  },
  created() {
    let datas = localStorage.getItem("lzyyToken");
    let Athis = this;
    if (datas != null) {
      this.$tokens = datas;
    } else {
      this.$message.error("登录错误，请重新登录");
      setTimeout(function() {
        Athis.$router.replace({ path: "/land" });
      }, 1000);
    }
    this.init();
    // this.state=this.$route.query.state
  },
  methods: {
    init() {
      //   个人信息
      usergetinfo({
        token: this.$tokens
      }).then(res => {
        this.userList = res.data;
      });
    }
  }
};
</script>

<style lang="less" scoped>
.list {
  .title {
    height: 69px;
    line-height: 69px;
    font-size: 18px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: rgba(78, 238, 200, 1);
    padding-left: 36px;
    border-bottom: 1px solid #e6e6e6;
  }
  .box {
    height: 170px;
    padding-left: 30px;
    padding-right: 30px;
    padding-top: 30px;
    border-bottom: 1px solid #e6e6e6;
    img {
      width: 110px;
      height: 110px;
      margin-right: 32px;
    }
    p {
      font-size: 18px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(49, 49, 49, 1);
    }
    .txt {
      span {
        margin-right: 30px;
      }
      p {
        margin-bottom: 16px;
      }
      p:nth-of-type(2) {
        margin-bottom: 24px;
      }
    }
    .c1 {
      color: #4eeec8;
    }
    .redc {
      color: #f32f2f;
    }
    .hui {
      color: #a8a8a8;
    }
  }
}
.chufang {
  min-height: 690px;
}
</style>